package com.deercrowing.takeaway.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.deercrowing.takeaway.entity.UsersEntity;
import org.apache.ibatis.annotations.Select;

import java.util.Map;


/**
 * 用户表(Users)表数据库访问层
 *
 * @author guoyongxiang
 * @since 2024-07-25 10:39:19
 */
@Mapper
public interface UsersMapper extends BaseMapper<UsersEntity> {

    @Select("select * from tb_users where openid = #{openid}")
    UsersEntity getByOpenid(String openid);

    /**
     * 根据动态条件统计用户数量
     * @param map
     * @return
     */
    Integer countByMap(Map map);
}

